Skip to content

Conversation

@bluwy
Copy link
Member

@bluwy bluwy commented Jul 29, 2024

Description

Follow-up from #17788

This PR enables eslint typechecking when it runs in IDEs as typechecking is slow to be enabled by default. I fiddled with other options, but this seems like the best balance that doesn't affect local DX but still encourages better code written.

With that setup (and the rules added from #17788), I'm able to detect additional places where some regex refactors help improve performance, especially for using RegExp#exec is faster than String#match.

I had previously ran some benchmarks from lukeed/polka#210, which showed that RegExp#exec is consistently faster than String#match, especially for longer regex or strings.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏼

@patak-dev patak-dev merged commit 952bae3 into main Jul 29, 2024
@patak-dev patak-dev deleted the eslint-typecheck-ide branch July 29, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants